[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function center - coordinate to center a message on screen
Syntax int center(char *str);
Prototype in video.h
Remarks center() will determine the proper X-coordinate to
display str centered horizontally with the current
window area. See Borland's explanation of window()
and related topics for further details.
Return value returns X coordinate to display str centered
horizontally within the window() corrdinates.
Example #include <video.h>
main()
{
char msg[] = "This will be centered on line 3"
gotoxy(center(msg),3);
cputs(msg);
}
Program output
This will be centered on line 3
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson